@import '../../style/_variables.less';

.mooli-binput {
  position: relative;
  font-family: 'Poppins';
  caret-color: #f7a700;
  position: relative;

  .mooli-field {
    display: flex;
    align-items: center;
    overflow: initial;
    padding: 22px 0 12px;
    content-visibility: initial;
    border-bottom: 1px solid #e3e3e3;
  }

  .mooli-field--label {
    font-size: 16px;
    color: #acacac;
  }

  .mooli-field--control {
    font-size: 16px;
    font-weight: 400;
    color: #131313;
  }

  .mooli-field--error {
    border-color: #f5222d !important;
  }

  &--animate {
    .mooli-field {
      padding: 12px 0;

      &:after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -1px;
        transition: 0.4s;
        width: 0;
        border-bottom: 1px solid #f7a700;
      }

      &.mooli-field--focused {
        &:after {
          width: 100%;
          transition: 0.4s;
          left: 0;
        }
      }

      &.mooli-field--has-value,
      &.mooli-field--focused {
        .mooli-field--label {
          font-size: 12px;
          top: 8px;
          transition: 0.3s;
        }
      }
    }

    .mooli-field--label {
      position: absolute;
      left: 0;
      top: 22px;
      margin: auto;
      transition: 0.3s;
      font-size: 16px;
      color: #acacac;
    }

    .mooli-field--control {
      padding-top: 18px;
    }

    .mooli-field--prefix {
      padding-top: 18px;
      margin-right: 8px;
      font-size: 16px;
      color: #131313;
    }

  }

  &--border {
    .mooli-field {
      padding: 21px 16px;
      border: 1px solid #e3e3e3;
      border-radius: 8px;

      &:after {
        border-bottom: none;
      }
    }
  }

  &--border&--animate {
    .mooli-field {
      padding: 12px 16px;
    }

    .mooli-field--label {
      top: 22px;
      left: 16px;
    }
  }

  &--errormessage {
    margin-top: 8px;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    color: #f5222d;
  }

  &--border &--errormessage {
    padding: 0 16px;
  }

  &--disabled {
    .mooli-field {
      background: #f7f7f7;

      .mooli-field--body {
        .mooli-field--control:disabled {
          -webkit-text-fill-color: currentColor;
        }
      }
    }
  }

  &--required {
    .mooli-field {
      .mooli-field--label {
        &:before {
          margin-right: 2px;
          color: #ee0a24;
          font-size: 14px;
          content: '*';
        }
      }
    }
  }
}